//
//  NetworkService.m
//  deerkids
//
//  Created by 王昭的Mac Air on 2017/8/29.
//  Copyright © 2017年 wangzhao. All rights reserved.
//

#import "NetworkService.h"
#import "ZZHttpInterface.h"

@implementation NetworkService
+(void)getUserInfo:(NSDictionary *)parameters success:(void (^)(id))success failure:(void (^)(NSError *,NSString *))failure{
    [NetworkUtil GET:API_Login parameters:parameters success:^(id responseObject,NSDictionary *dictionary) {
        if (success) {
            success(dictionary);
        }
    } failure:^(NSError *error,NSString *message) {
        if (error) {
            failure(error,message);
        }
    }];
}


#pragma mark - 发送短信验证码
+ (void)postLoginCode:(NSDictionary *)parameters success:(void (^)(id responseObject))success failure:(void (^)(NSError *error,NSString *message))failure
{
    [NetworkUtil POST:API_Register parameters:parameters success:^(id responseObject,NSDictionary *dictionary) {
        if (success) {
            success(dictionary);
        }
    } failure:^(NSError *error,NSString *message) {
        if (error) {
            failure(error,@"");
        }
    }];
}

@end
